<!DOCTYPE html>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.2.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/vhuichen.ico">
  <link rel="icon" type="image/png" sizes="32x32" href="/vhuichen.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/vhuichen.ico">
  <link rel="mask-icon" href="/vhuichen.ico" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha256-AbA177XfpSnFEvgpYu1jMygiLabzPCJCRIBtR5jGc0k=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"vhuichen.github.io","root":"/","images":"/images","scheme":"Pisces","darkmode":false,"version":"8.13.0","exturl":false,"sidebar":{"position":"left","display":"display","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"}}</script><script src="/js/config.js"></script>

    <meta name="description" content="SVN相关概念主干(trunk)、分支(branch)、标记(tag)trunk：有两种说法：1、主方向开发，版本迭代，一个新的需求，一般都是放在trunk里面开发的。2、也有一种做法是把所有开发的工作都拉到branch上去完成，也就是trunk和tag只负责版本记录，brank负责所有的开发工作。当brank完成某一部分功能的时候合并到trunk，其他人便可从trunk拉最新的代码。   bra">
<meta property="og:type" content="article">
<meta property="og:title" content="iOS开发之使用SVN管理代码(Cornerstone)">
<meta property="og:url" content="https://vhuichen.github.io/2017/11/2017/11/iOS%E5%BC%80%E5%8F%91%E4%B9%8B%E4%BD%BF%E7%94%A8SVN%E7%AE%A1%E7%90%86%E4%BB%A3%E7%A0%81(Cornerstone)/index.html">
<meta property="og:site_name" content="vhuichen">
<meta property="og:description" content="SVN相关概念主干(trunk)、分支(branch)、标记(tag)trunk：有两种说法：1、主方向开发，版本迭代，一个新的需求，一般都是放在trunk里面开发的。2、也有一种做法是把所有开发的工作都拉到branch上去完成，也就是trunk和tag只负责版本记录，brank负责所有的开发工作。当brank完成某一部分功能的时候合并到trunk，其他人便可从trunk拉最新的代码。   bra">
<meta property="og:locale">
<meta property="og:image" content="http://ovsbvt5li.bkt.clouddn.com/17-11-21/33390938.jpg">
<meta property="og:image" content="http://ovsbvt5li.bkt.clouddn.com/17-11-21/74190763.jpg">
<meta property="og:image" content="http://ovsbvt5li.bkt.clouddn.com/17-11-25/45698966.jpg">
<meta property="article:published_time" content="2017-11-05T14:31:14.000Z">
<meta property="article:modified_time" content="2018-07-01T08:09:12.237Z">
<meta property="article:author" content="vhuichen">
<meta property="article:tag" content="SVN">
<meta property="article:tag" content="Cornerstone">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://ovsbvt5li.bkt.clouddn.com/17-11-21/33390938.jpg">


<link rel="canonical" href="https://vhuichen.github.io/2017/11/2017/11/iOS%E5%BC%80%E5%8F%91%E4%B9%8B%E4%BD%BF%E7%94%A8SVN%E7%AE%A1%E7%90%86%E4%BB%A3%E7%A0%81(Cornerstone)/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-Hans","comments":true,"permalink":"https://vhuichen.github.io/2017/11/2017/11/iOS%E5%BC%80%E5%8F%91%E4%B9%8B%E4%BD%BF%E7%94%A8SVN%E7%AE%A1%E7%90%86%E4%BB%A3%E7%A0%81(Cornerstone)/","path":"2017/11/2017/11/iOS开发之使用SVN管理代码(Cornerstone)/","title":"iOS开发之使用SVN管理代码(Cornerstone)"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>iOS开发之使用SVN管理代码(Cornerstone) | vhuichen</title>
  






  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">vhuichen</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">记录、分享</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section">Home</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section">Archives</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section">About</a></li>
  </ul>
</nav>




</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#SVN%E7%9B%B8%E5%85%B3%E6%A6%82%E5%BF%B5"><span class="nav-number">1.</span> <span class="nav-text">SVN相关概念</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%BB%E5%B9%B2-trunk-%E3%80%81%E5%88%86%E6%94%AF-branch-%E3%80%81%E6%A0%87%E8%AE%B0-tag"><span class="nav-number">1.1.</span> <span class="nav-text">主干(trunk)、分支(branch)、标记(tag)</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Cornerstonr%E6%93%8D%E4%BD%9C"><span class="nav-number">2.</span> <span class="nav-text">Cornerstonr操作</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#SVN%E6%90%AD%E5%BB%BA%E3%80%81%E9%85%8D%E7%BD%AE"><span class="nav-number">2.1.</span> <span class="nav-text">SVN搭建、配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Check-Out-working-copy"><span class="nav-number">2.2.</span> <span class="nav-text">Check Out (working copy)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Merge"><span class="nav-number">2.3.</span> <span class="nav-text">Merge</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Commit"><span class="nav-number">2.4.</span> <span class="nav-text">Commit</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="vhuichen"
      src="/images/vhuichen.jpg">
  <p class="site-author-name" itemprop="name">vhuichen</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">78</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">11</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">86</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="Back to top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="https://vhuichen.github.io/2017/11/2017/11/iOS%E5%BC%80%E5%8F%91%E4%B9%8B%E4%BD%BF%E7%94%A8SVN%E7%AE%A1%E7%90%86%E4%BB%A3%E7%A0%81(Cornerstone)/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/vhuichen.jpg">
      <meta itemprop="name" content="vhuichen">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="vhuichen">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="iOS开发之使用SVN管理代码(Cornerstone) | vhuichen">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          iOS开发之使用SVN管理代码(Cornerstone)
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2017-11-05 22:31:14" itemprop="dateCreated datePublished" datetime="2017-11-05T22:31:14+08:00">2017-11-05</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">Edited on</span>
      <time title="Modified: 2018-07-01 16:09:12" itemprop="dateModified" datetime="2018-07-01T16:09:12+08:00">2018-07-01</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">In</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/iOS%E5%BC%80%E5%8F%91/" itemprop="url" rel="index"><span itemprop="name">iOS开发</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h2 id="SVN相关概念"><a href="#SVN相关概念" class="headerlink" title="SVN相关概念"></a>SVN相关概念</h2><h3 id="主干-trunk-、分支-branch-、标记-tag"><a href="#主干-trunk-、分支-branch-、标记-tag" class="headerlink" title="主干(trunk)、分支(branch)、标记(tag)"></a>主干(trunk)、分支(branch)、标记(tag)</h3><p><strong>trunk：</strong>有两种说法：<br>1、主方向开发，版本迭代，一个新的需求，一般都是放在trunk里面开发的。<br>2、也有一种做法是把所有开发的工作都拉到branch上去完成，也就是trunk和tag只负责版本记录，brank负责所有的开发工作。当brank完成某一部分功能的时候合并到trunk，其他人便可从trunk拉最新的代码。  </p>
<p><strong>branch：</strong>和trunk并行开发。有几种情况下需要创建branch：<br>1、当某个功能不确定能否实现或者想先看看效果的时候，可以拉一个branch,在这个branch上开发，开发完成，再考虑是否合并到trunk。<br>2、当trunk正在开发某个最新版本的时候，线上版本出现一个急需修复的bug，由于时间紧，不能等到新版本开发完成的时候才修复这个bug，这时候就应该在线上版本对应的tag下拉一个branch，在这个branch下修复bug，测试，然后上线。</p>
<p><strong>tag：</strong>记录每一个milestone（里程碑），一般每一个线上版本都会打一个tag，一旦出现急需修复的bug，可以在对应的tag下拉一个branch进行修复。</p>
<p><strong>branch是动态的，一直往前走。tag是静态的，只做版本记录，相当于只读。</strong><br><strong>至于trunk我理解的是功能的集合，多人协同开发时，每个人每当完成一个功能都将合并到trunk中，也可以将trunk中最新的代码合并到自己的branch中</strong></p>
<h2 id="Cornerstonr操作"><a href="#Cornerstonr操作" class="headerlink" title="Cornerstonr操作"></a>Cornerstonr操作</h2><h3 id="SVN搭建、配置"><a href="#SVN搭建、配置" class="headerlink" title="SVN搭建、配置"></a>SVN搭建、配置</h3><p>参考另一篇文章：<br><a href="https://vhuichen.github.io/2016/10/18/161018-iOS%E5%9F%BA%E7%A1%80%E4%B9%8B%E6%90%AD%E5%BB%BASVN%E6%9C%8D%E5%8A%A1%E5%99%A8/">iOS基础之搭建SVN服务器</a></p>
<h3 id="Check-Out-working-copy"><a href="#Check-Out-working-copy" class="headerlink" title="Check Out (working copy)"></a>Check Out (working copy)</h3><p><img src="http://ovsbvt5li.bkt.clouddn.com/17-11-21/33390938.jpg"><br>选中对应的项目，点击左上角的Check Out,将项目copy到本地<br><img src="http://ovsbvt5li.bkt.clouddn.com/17-11-21/74190763.jpg">   </p>
<h3 id="Merge"><a href="#Merge" class="headerlink" title="Merge"></a>Merge</h3><p>选中需要Merge的项目（也就是合并后的项目），点击Merge，出现如下图所示的界面：<br><img src="http://ovsbvt5li.bkt.clouddn.com/17-11-25/45698966.jpg"><br>在Merge from里选择被合并的项目。点击 Merge Changes ，完成。   </p>
<h3 id="Commit"><a href="#Commit" class="headerlink" title="Commit"></a>Commit</h3><p>将本地代码提交带远程仓库。</p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/SVN/" rel="tag"># SVN</a>
              <a href="/tags/Cornerstone/" rel="tag"># Cornerstone</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2017/07/2017/07/iOS%E5%BC%80%E5%8F%91%E4%B9%8B%E5%88%A4%E6%96%ADView%E6%98%AF%E5%90%A6%E6%98%BE%E7%A4%BA%E5%9C%A8%E5%BD%93%E5%89%8D%E7%AA%97%E5%8F%A3/" rel="prev" title="iOS开发之判断View是否显示在当前窗口">
                  <i class="fa fa-chevron-left"></i> iOS开发之判断View是否显示在当前窗口
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2017/11/2017/11/iOS%E5%BC%80%E5%8F%91%E4%B9%8BAPP%E9%BB%98%E8%AE%A4%E8%AF%AD%E8%A8%80/" rel="next" title="iOS开发之APP默认语言">
                  iOS开发之APP默认语言 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 2015 – 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">vhuichen</span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/pisces/" rel="noopener" target="_blank">NexT.Pisces</a>
  </div>

    </div>
  </footer>

  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script>

  





  





</body>
</html>
